package com.sino.report;

import javax.xml.parsers.*;
import org.w3c.dom.*;

public class PageInfo {
  private int marginLeft;
  private int marginTop;
  private int marginRight;
  private int marginBottom;
  private String CellStyleID;

  public PageInfo() {
  }

  public void load(NodeList node) {
    for (int m = 0; m < node.getLength(); m++) {
      if (node.item(m).getNodeName().equals("marginLeft")) {
        marginLeft = Integer.parseInt(node.item(m).getChildNodes().item(0).getNodeValue());
      }
      else if (node.item(m).getNodeName().equals("marginTop")) {
        marginTop = Integer.parseInt(node.item(m).getChildNodes().item(0).getNodeValue());
      }
      else if (node.item(m).getNodeName().equals("marginRight")) {
        marginRight = Integer.parseInt(node.item(m).getChildNodes().item(0).getNodeValue());
      }
      else if (node.item(m).getNodeName().equals("marginBottom")) {
        marginBottom = Integer.parseInt(node.item(m).getChildNodes().item(0).getNodeValue());
      }
      else if (node.item(m).getNodeName().equals("style")) {
        CellStyleID = (node.item(m).getChildNodes().item(0).getNodeValue());
      }
    }
  }

  public int getMarginLeft() {
    return marginLeft;
  }

  public void setMarginLeft(int marginLeft) {
    this.marginLeft = marginLeft;
  }

  public int getMarginTop() {
    return marginTop;
  }

  public void setMarginTop(int marginTop) {
    this.marginTop = marginTop;
  }

  public int getMarginRight() {
    return marginRight;
  }

  public void setMarginRight(int marginRight) {
    this.marginRight = marginRight;
  }

  public int getMarginBottom() {
    return marginBottom;
  }

  public void setMarginBottom(int marginBottom) {
    this.marginBottom = marginBottom;
  }

  public String getCellStyleID() {
    return CellStyleID;
  }

  public void setCellStyleID(String CellStyleID) {
    this.CellStyleID = CellStyleID;
  }
}
